<!DOCTYPE html>
<html>

<head>
    <meta charset='UTF-8'>
    <meta name='viewport' content='width=device-width,initial-scale=1.0'>
    <meta http-equiv='X-UA-Compatible' content='ie=edge'>
    <title>Document</title>
</head>

<body>
    <div id='app'>
        <!-- v-for(列表渲染) -->
        <!-- <span v-for="v in array">{{v}}</span> -->
        <!-- 
        <ul>
            <li v-for="v in array">
                <span>国家是:{{v}}</span>
            </li>
        </ul> -->

        <!-- v-for中的key的值要求是一个唯一标识
        唯一标识: 每个元素和其他元素不同的地方 -->

        <!-- 最终版本 -->
        <ul>
            <li v-for="(v,i) in array" :key="i">{{v}}--{{i}}</li>
        </ul>

        <ul>
            <li v-for="(v,k,i) in per" :key="i">{{v}}--{{i}}</li>
        </ul>




    </div>
    <script src='./vue.js'></script>
    <script>
        new Vue({
            el: '#app',
            data: {
                per: {
                    name: '小刘',
                    age: 18,
                    gender: '未知'
                },
                array: ['欧美', '日韩', '亚洲']
            },
            methods: {

            }
        });
    </script>
</body>

</html>